﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class UserControls_ArticleDetails : UCBase
{
    public UserControls_ArticleDetails()
    {
        Name = "文章详细信息";
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadData();
    }

    /// <summary>
    /// 根据编号加载文章详细信息
    /// </summary>
    private void LoadData()
    {
        this.hID.Value = Shove._Web.Utility.GetRequest("ID");

        DataTable dt = new DAL.Views.V_Site_Article().Open("", "isShow = 1 and ID=" + this.hID.Value + "", "");

        if (dt != null && dt.Rows.Count > 0)
        {
            DataRow dr = dt.Rows[0];
            lbTitle.Text = dr["Title"].ToString();
            lbContent.Text = dr["Content"].ToString();
            lbDate.Text = dr["CreateDate"].ToString();
        }
    }
}
